package com.bw.repair.net

import com.bw.base.constants.ApiConst
import com.bw.http.utils.Res
import com.bw.repair.entity.RepairEntity
import okhttp3.MultipartBody
import retrofit2.http.*

interface ApiService {
    @GET(ApiConst.URL_GET_REPAIR)
    suspend fun getRepair(): Res<List<RepairEntity>>

    @POST(ApiConst.URL_POST_REPAIR)
    suspend fun postRepair(@Body repairEntity: RepairEntity): Res<RepairEntity>

    @DELETE(ApiConst.URL_DELETE_REPAIR)
    suspend fun deleteRepair(@Path("id") id: Int): Res<String>

    @Multipart
    @POST(ApiConst.UPLOAD_FILE)
    suspend fun uploadFile(
        @Part part: MultipartBody.Part,
        @Query("modulename") modulename: String,
        @Query("userid") userid: String
    ):Res<String>
}